﻿using Google.GData.Client;
using Moq;
using NUnit.Framework;

namespace Google.Analytics.ModelTests
{
    [TestFixture]
    public class ModelTestBase
    {
        protected IService Service;

        /// <summary>
        /// Sets up model tests
        /// </summary>
        [SetUp]
        protected void SetUp()
        {
            Service = GetMockedService();
        }

        /// <summary>
        /// Gets the mocked service
        /// </summary>
        /// <returns></returns>
        private static IService GetMockedService()
        {
            var serviceMock = new Mock<IService>();
            serviceMock.Expect(x => x.Credentials).Returns(new GDataCredentials("username", "password"));
            return serviceMock.Object;
        }
    }
}
